/*
 * @Description: 档案篮
 * @Author: Zzt
 * @Date: 2023-03-01 20:26:48
 * @LastEditTime: 2023-03-01 20:43:42
 */
import request from '@/utils/request';
import { Key } from 'react';
import { IPageQuery } from '@/interfaces/global';
export interface IBasketParams {
  archiveTypeId?: number;
  dbName?: string;
  entryId?: number;
  fondsId?: number;
  level?: number;
  remark?: string;
  title?: string;
}
// 分页获取档案篮列表
export function fetchBasketByPage(data: IPageQuery<IBasketParams>) {
  return request({
    url: `/archive-basket/page`,
    method: 'post',
    data
  });
}
// 新增收藏夹列表
export function addBasketList(data: IBasketParams) {
  return request({
    url: `/archive-basket`,
    method: 'post',
    data
  });
}
// 修改收藏夹列表
export function editBasketList(data: IBasketParams) {
  return request({
    url: `/archive-basket`,
    method: 'put',
    data
  });
}
// 查询列表
export function fetchBasketList(data: IBasketParams) {
  return request({
    url: `/archive-basket/list`,
    method: 'post',
    data
  });
}
// 根据ID查询收藏夹
export function fetchBasketById(id: number) {
  return request({
    url: `/archive-basket/${id}`,
    method: 'get'
  });
}
// 根据ID删除收藏夹
export function delBasketById(id: string | number) {
  return request({
    url: `/archive-basket/${id}`,
    method: 'delete'
  });
}
